The yyerrok macro
Last Updated: 2021-04-08
In some situations, you may want yyerror() to be called even if the parser has not seen three correct tokens since the last error.
For example, suppose you have a parser for a line-by-line desk calculator. A line of input contains errors, so yyerror() is called. yyerror() displays an error message to the user, throws away the rest of the line, and prompts for new input. If the next line contains an error in the first three tokens, the parser normally starts discarding input without calling yyerror() again. This means that yyerror() does not display an error message for the user, even though the input line is wrong.
